/**
 * @ClassName LC1137
 * 第 N 个泰波那契数
 * @Author ykx
 * @Date 2024/3/25 11:05
 * @Version 1.0
 */
public class LC1137 {
    public int tribonacci(int n) {
        if (n == 0 || n == 1) {
            return n;
        } else if (n == 2) {
            return n - 1;
        } else {
            return tribonacci(n - 1) + tribonacci(n - 2) + tribonacci(n - 3);
        }
    }
}
